#ifndef JITASSERT_H
#define JITASSERT_H
#pragma once
#include <assert.h>

#define DEBUG_ASSERT assert
#define RELEASE_ASSERT assert

#define LOG_LEVEL_VERBOSE  0
#define LOG_LEVEL_DEBUG 1
#define LOG_LEVEL_WARNNING 2
#define LOG_LEVEL_ERROR 3

#if defined(LOG_LEVEL)

#if LOG_LEVEL >= LOG_LEVEL_VERBOSE
#define  LOG_VERBOSE(...) \
    logVerbose(__VA_ARGS__)
extern "C" int logVerbose(const char * fmt,...);
#else
#define LOG_VERBOSE(...)
#endif // LOG_LEVEL >= 0

#if LOG_LEVEL >= LOG_LEVEL_DEBUG
#define LOG_WARNING(...) \
    logDebug(__VA_ARGS__)
extern "C" int logDebug(const char *fmt,...);
#else
#define LOG_DEBUG(...)
#endif //LOG_LEVEL >= 1

#if LOG_LEVEL >= LOG_LEVEL_WARNNING
#define LOG_WARNING(...) \
    logWarn(__VA_ARGS__)
extern "C" int logWarn(const char *fmt,...);
#else
#define LOG_WARNING(...)
#endif //LOG_LEVEL >= 1


#endif //LOG_LEVEL

#ifndef LOG_WARNING
#define LOG_WARNING(...)
#endif // LOG_WARNING

#ifndef LOG_VERBOSE
#define LOG_VERBOSE(...)
#endif // LOG_VERBOSE

#ifndef LOG_DEBUG
#define LOG_DEBUG(...)
#endif // LOG_DEBUG

#endif /* JITASSERT_H */
